//
//  RankButtonTableViewCell.m
//  WZLProduct
//
//  Created by boys on 16/3/25.
//  Copyright © 2016年 HaiTeng. All rights reserved.
//

#import "RankButtonTableViewCell.h"

@implementation RankButtonTableViewCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.numberLabel = [[UILabel alloc ] init];
        _numberLabel.backgroundColor = [UIColor redColor];
        [self.contentView addSubview:_numberLabel];
        
        self.name = [[UILabel alloc] init];
        _name.backgroundColor = [UIColor yellowColor];
        [self.contentView addSubview:_name];
        
        self.songsName = [[UILabel alloc ] init];
        _songsName.backgroundColor = [UIColor greenColor];
        [self.contentView addSubview:_songsName];
        
        self.heartImg = [[UIImageView alloc] init];
        _heartImg.backgroundColor = [UIColor yellowColor];
        [self.contentView addSubview:_heartImg];
        
        self.moreImg = [[UIImageView alloc] init];
        _moreImg.backgroundColor = [UIColor purpleColor];
        [self.contentView addSubview:_moreImg];
        
     
        
    }
    return self;
}
- (void)layoutSubviews {
    [super layoutSubviews];
    [_numberLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.height.width.offset(25);
        make.centerY.mas_equalTo(self.contentView);
    }];
    [_name mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.offset(10);
        make.bottom.offset(- 45);
        make.left.equalTo(self.numberLabel.mas_right).with.offset(25);
        make.width.offset(200);
    }];
    [_songsName mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.name.mas_bottom).with.offset(10);
        make.bottom.offset(-15);
        make.left.equalTo(_name);
        make.width.offset(200);
    }];
    [_moreImg mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.offset(20);
        make.bottom.offset(-20);
        make.right.offset(- 10);
        make.width.offset(20);
    }];
    
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
